<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home extends MY_Controller {

	function __construct() 
	{
		parent::__construct();
	}

	public function index()
	{
        $this->template->set_theme('default');
        $this->template->set_layout('main');
        
        $this->template->title('Testando o template');
        $this->template->build('home');
		
		
		//È SO PRA TESTE!! GAY!
		$query = $this->db->query('SELECT * FROM usuarios');

		foreach ($query->result() as $row)
		{
		    echo $row->nomeusuario;
			echo "<br/>";
		    echo $row->email;
			echo "<br/>";
		}

		echo 'Total Results: ' . $query->num_rows(); 
		
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */